import 'dart:convert';
import 'dart:io';
import 'dart:async';

class Http {

  static const String Url = 'http://test.pay.zj.cn/spdbaccount/acquire/payments';

  static Future<dynamic>? request(url) async {
    var httpClient = HttpClient();
    var request = await httpClient.getUrl(Uri.parse(url));
    var response = await request.close();
    if (response.statusCode == HttpStatus.ok) {
      var json = await response.transform(utf8.decoder).join();
      return json;
    }
    return null;
  }
}
